
/**
 *
 * @author Bora SAYINER
 * @since Dec 28, 2014 12:53:28 PM
 * @version 1.0
 */
public class Singleton {

	private static Singleton INSTANCE;

	private Singleton() {

	}

	// synchronized method block
	// public synchronized static final Singleton getINSTANCE() {
	// if (INSTANCE == null) {
	// INSTANCE = new Singleton();
	// }
	// return INSTANCE;
	// }

	// synchronized block
	public static final Singleton getINSTANCE() {
		if (INSTANCE == null) {
			synchronized (INSTANCE) {
				if (INSTANCE == null) {
					INSTANCE = new Singleton();
				}
			}
		}
		return INSTANCE;
	}
}
